import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [{
    path: '/',
    component: () => import('@/views/home.vue')
  }, {
    path: '/trend',
    component: () => import('@/views/trend/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/trend/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/trend/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/trend/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/trend/stock.vue')
    }]
  }, {
    path: '/strategy',
    component: () => import('@/views/strategy/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/strategy/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/strategy/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/strategy/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/strategy/stock.vue')
    }]
  }, {
    path: '/hosted',
    component: () => import('@/views/hosted/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/hosted/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/hosted/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/hosted/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/hosted/stock.vue')
    }]
  }, {
    path: '/signal',
    component: () => import('@/views/signal/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/signal/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/signal/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/signal/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/signal/stock.vue')
    }]
  }, {
    path: '/closed',
    component: () => import('@/views/closed/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/closed/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/closed/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/closed/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/closed/stock.vue')
    }]
  }, {
    path: '/holden',
    component: () => import('@/views/holden/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/holden/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/holden/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/holden/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/holden/stock.vue')
    }]
  }, {
    path: '/module',
    component: () => import('@/views/module/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/module/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/module/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/module/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/module/stock.vue')
    }]
  }, {
    path: '/order',
    component: () => import('@/views/order/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/order/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/order/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/order/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/order/stock.vue')
    }]
  }, {
    path: '/rights',
    component: () => import('@/views/rights/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/rights/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/rights/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/rights/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/rights/stock.vue')
    }]
  }, {
    path: '/whole',
    component: () => import('@/views/whole/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/whole/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/whole/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/whole/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/whole/stock.vue')
    }]
  }, {
    path: '/mine',
    component: () => import('@/views/mine/index.vue'),
    children: [{
      path: 'forex',
      component: () => import('@/views/mine/forex.vue')
    }, {
      path: 'future',
      component: () => import('@/views/mine/future.vue')
    }, {
      path: 'option',
      component: () => import('@/views/mine/option.vue')
    }, {
      path: 'stock',
      component: () => import('@/views/mine/stock.vue')
    }]
  }, {
    path: '/login',
    component: () => import('@/views/user/login.vue')
  }, {
    path: '/register',
    component: () => import('@/views/user/register.vue')
  }, {
    path: '/reset_password',
    component: () => import('@/views/user/reset_password.vue')
  }, {
    path: '/password',
    component: () => import('@/views/user/password.vue')
  }, {
    path: '/wechat',
    component: () => import('@/views/user/wechat.vue')
  }, {
    path: '/stream',
    component: () => import('@/views/user/stream.vue')
  }, {
    path: '/verify',
    component: () => import('@/views/user/verify.vue')
  }, {
    path: '/share',
    component: () => import('@/views/user/share.vue')
  }, {
    path: '/about',
    component: () => import('@/views/user/about.vue')
  }, {
    path: '/info',
    component: () => import('@/views/user/info.vue')
  }]
})
